package 对象的创建;

import java.util.Date;

public class Main {
    public static void main(String[] args) {
        Date date = new Date();
        System.out.println(date);
        System.out.println(date.getTime());


        //1.得到当前时间
        Date date1 = new Date();
        System.out.println(date1);

        //2.获取当前时间毫秒数
        long time = System.currentTimeMillis();
        time += (60*60 +121) * 1000;

        //3.把时间毫秒值转换成对应的日期对象
//        Date date2 = new Date(time);
//        System.out.println(date2);

        Date date2 = new Date();
        date2.setTime(time);
        System.out.println(date2);
    }
}
